Tabulation of Functions in Definite Clause Programs
نویسنده
چکیده
An extended version of the applicative caching technique from functional programming is adapted to OLD resolution as an alternative to OLDT resolution for predicates that are actually functions. An inference system, OLDTF resolution, is given with a proof procedure. It is argued why this special case is interesting in its own right also outside the area of deductive databases. It is outlined how special cases of our technique can be used to declaratively incorporate eecient data structures with state in logic programs. 1 Introduction In a programming language with referential transparency, an expression can be replaced with any other expression that has the same meaning. Tabulation in functional programming In functional programming languages this has been exploited through a technique called tabulation or memoing 6, 15, 18, 23]. This means to maintain, for selected functions, a table of pairs of domain-codomain elements that have already been computed. Further applications of the function to values for which there are \cached" results can be solved by simple table look-ups. The motivation is to speed up execution of programs by avoid recompu-tation of function applications, at the expense of using more space.
منابع مشابه
Compiling HPSG Type Constraints into Definite Clause Programs
We present a new approach to HPSG processing: compiling HPSG grammars expressed as type constraints into definite clause programs. This provides a clear and computationally useful correspondence between linguistic theories and their implementation. The compiler performs off-line constraint inheritance and code optimization. As a result, we are able to efficiently process with HPSG grammars with...
متن کاملKelpie: a Concurrent Logic Programming System for Knowledge Based Applications
A software architecture that interfaces a concurrent logic programming system to a Prolog database machine is described. The concurrent logic programming system connects a guarded clause inference engine with a definite clause inference engine to support concurrent execution of mutually invoking guarded and definite clause programs. An interface to a Prolog database machine allows the concurren...
متن کاملDeclarative semantics of a meta-programming language?
We present a logical programming language, generative clause programs, which generalize definite clause programs with a meta-programming level. The fundamental notion in the language is that of a meta-goal which consists of a plain goal together with a program in which it is expected to be true. The declarative semantics can be defined in terms of Herbrand models consisting of such meta-goals. ...
متن کاملInterpreting Bayesian Logic Programs
Various proposals for combining first order logic with Bayesian nets exist. We introduce the formalism of Bayesian logic programs, which is basically a simplification and reformulation of Ngo and Haddawys probabilistic logic programs. However, Bayesian logic programs are sufficiently powerful to represent essentially the same knowledge in a more elegant manner. The elegance is illustrated by th...
متن کاملBayesian Logic Programs
Bayesian networks provide an elegant formalism for representing and reasoning about uncertainty using probability theory. They are a probabilistic extension of propositional logic and, hence, inherit some of the limitations of propositional logic, such as the difficulties to represent objects and relations. We introduce a generalization of Bayesian networks, called Bayesian logic programs, to o...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1994